<!------------------- 头部CSS部分 start-------------------------------------------------------------------------------->
{include file="Public/head"/}
<!------------------- 头部CSS部分 end---------------------------------------------------------------------------------->

<body class="no-skin">

<!---------------------头部消息栏,用户栏 start--------------------------------------------------------------------->
{include file="Public/header"/}
<!---------------------头部消息栏,用户栏 end----------------------------------------------------------------------->

<div class="main-container" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>

    <!-------------------------菜单栏 start-------------------------------------------------------------------->
    {include file="Public/menu"/}
    <!-------------------------菜单栏 end---------------------------------------------------------------------->

    <div class="main-content">
        <div class="main-content-inner">

            <!-------------------------------路径导航 面包屑 start--------------------------------------------->
            {include file="Public/breadcrumbs"/}
            <!-------------------------------路径导航 面包屑 end----------------------------------------------->

            <div class="page-content">

                <!-----------------------------右侧设置 页面提示消息 start------------------------------------->
                {include file="Public/set"/}
                <!-----------------------------右侧设置 页面提示消息 end--------------------------------------->

                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <form id="export-form" method="post" action="{:url('Group/del')}">
                            <table class="table table-striped table-bordered table-hover">
                                <thead>
                                <tr>
                                    <th class="center"><input class="check-all" type="checkbox" value=""></th>
                                    <th>用户组</th>
                                    <th>状态</th>
                                    <th class="center">操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                {volist name="list" id="val"}
                                    <tr>
                                        <td class="center">

                                            {if condition="$val.id neq 1"}
                                                <input class="ids" type="checkbox" name="ids[]" value="{$val.id}">
                                                {else/}
                                                <span title="系统用户组，禁止删除">--</span>
                                            {/if}

                                        </td>
                                        <td>{$val.name}</td>
                                        <td>
                                            {if condition="$val.id eq 1 "}
                                                启用
                                            {elseif  condition="$val.status eq 1" /}
                                                <a href="{:url('Group/status',array('id'=>$val.id))}" title="点击禁用">启用</a>
                                            {else /}
                                                <a href="{:url('Group/status',array('id'=>$val.id))}" title="点击启用">禁用</a>
                                            {/if}
                                        </td>
                                        <td class="center"><a href="{:url('Group/add',array('id'=>$val.id))}">修改</a></td>
                                    </tr>
                                {/volist}
                                </tbody>
                            </table>
                            <div class="cf">
                                <input class="btn btn-info" type="submit" value="删除">
                            </div>
                        </form>
                        <!-- PAGE CONTENT ENDS -->
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!--------------------------------底部版权 置顶 start------------------------------------------------------>
    {include file="Public/footer"/}
    <!--------------------------------底部版权 置顶 end-------------------------------------------------------->

</div>

<!--------------------------------------底部JS start----------------------------------------------------------->
{include file="Public/footerjs"/}
<!--------------------------------------底部JS end------------------------------------------------------------->

<script type="text/javascript">
    (function ($) {
        $(".check-all").click(function () {
            $(".ids").prop("checked", this.checked);
        });
        $(".ids").click(function () {
            var option = $(".ids");
            option.each(function (i) {
                if (!this.checked) {
                    $(".check-all").prop("checked", false);
                    return false;
                } else {
                    $(".check-all").prop("checked", true);
                }
            });
        });
    })(jQuery);
</script>
</body>
</html>
